<template>
  <Frame>
    <h1 slot="contitle" class="title">项目获奖</h1>
    <div slot="text">
      <div class="block">
        <table>
          <thead>
          <tr>
            <th>项目名称</th>
            <th>奖项</th>
            <th>获奖时间</th>
            <th>获奖人</th>
          </tr>
          </thead>
          <tbody>
          <tr  v-for="item in list">
            <td>{{ item.award.raceOrProjectName}}</td>
            <td>{{ item.award.awardName}}</td>
            <td>{{ item.award.year}}-{{item.award.month}}-{{item.award.day }}</td>
            <td><span v-for="(item1,index) in item.memberName">  {{ item1 }}<span v-if="index<item.memberName.length-1">，</span></span></td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>
  </Frame>
</template>

<script>
// import Frame from "../Frame";
const Frame = () => import('../Frame')

export default {
  name: "ProjectAward",
  components: {
    Frame
  },
  data() {
    return {
      list: []
    }
  },
  created() {
    console.log(222)
    this.$nextTick(function () {
      // getma() {
      this.$axios({
        url: '/officialwebsite/awardFrontDeskController/selectProjectAll',
        method: 'get',
        // headers: {
        //   'X-CSRFToken': this.getCookie('csrftoken')
        // },
      }).then(res => {
        console.log(123456920)
        console.log(res)
        this.list =res.obj
        console.log(this.list)
      })
    })
  }
}
</script>

<style lang="less" scoped>
.block {
  table {
    width: 100%;
    margin: 0 auto;
    thead {
      height: 50px;
      line-height: 50px;
      font-weight: bold;
      font-size: 19px;
      tr {
        th {
          text-align: center;
        }
      }
    }

    tbody tr td {
      width: 25%;
      height: auto;
      padding: 13px 0;
      line-height: 25px;
      text-align: center;
      border-bottom: solid 1px #e2e2e2;
    }
  }
}
@media screen and (max-width: 1300px) {
  .block {
    thead {
      tr {
        th {
          font-size: 16px;
          text-align: center;
        }
      }
    }
    tbody tr td {
      font-size: 14px;
      padding: 5px 0!important;
      border-bottom: solid 1px #e2e2e2;
    }

  }
}
</style>
